$(function () {
    getData();
})
function getData() {
    var  year = $('#dateTime').val();
    console.log(year);
    $.ajax({
        url: "/count/finance",
        dataType: "json",
        type: "post",
        data:{year:year},
        success: function (json) {
            myChart.setOption({series:{
                name: '资金统计',
                type: 'pie',
                radius : '55%',
                center: ['50%', '60%'],
                data:json,
                itemStyle: {
                    emphasis: {
                        shadowBlur: 10,
                        shadowOffsetX: 0,
                        shadowColor: 'rgba(0, 0, 0, 0.5)'
                    }
                }
            }});
        },
        error: function () {layer.alert(year+"年无数据！")}
    })
}